Image forming apparatus

ABSTRACT

An image forming apparatus includes an acquisition unit that acquires a file stored in a storage medium, an expansion unit that expands the acquired file, an expansion control unit that controls the expansion unit to skip expanding of unexpanded data that is found to be impossible to expand from the file and to continue the expanding of the file, and a print unit that executes printing in accordance with expanded data from the file.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority from Japanese Patent Application No.2006-203008 filed on Jul. 26, 2006, the entire subject matter of whichis incorporated herein by reference.

TECHNICAL FIELD

Aspects of the present invention relate to an image forming apparatushaving a direct print function of effecting printing by capturing a filedirectly from a storage medium.

BACKGROUND

JP-A-2005-174261 discloses an image forming apparatus that enablesdirect attachment of a storage medium (e.g., a memory card) where filessuch as photographic images or the like captured by a digital camera arestored. The related image forming apparatus has a direct print functionof reading files stored in this storage medium and subjecting the filesto print processing.

In contrast with PC printing in which print data are received from apersonal computer and printed, direct printing does not involve use of aprinter driver. For example, a file may include data of a format whichcannot be originally expanded by the image forming apparatus or datawhich is corrupt and cannot be expanded. Therefore, the related imageforming apparatus is configured to end in an error upon detection ofdata which cannot be expanded and to abort subsequent print processing.

SUMMARY

Aspects of the present invention provide an image forming apparatuswhich can obviate a problem of printing operation being stopped by datawhich cannot be expanded.

According to an aspect of the invention, there is provided an imageforming apparatus including: an acquisition unit that acquires a filestored in a storage medium; an expansion unit that expands the acquiredfile; an expansion control unit that controls the expansion unit to skipexpanding of unexpanded data that is found to be impossible to expandfrom the file and to continue the expanding of the file; and a printunit that executes printing in accordance with expanded data from thefile.

According to the aspects of the invention, even if a file contains datawhich cannot be expanded, the data can be printed to the last withoutprint processing being stopped in midstream.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified view showing the hardware configuration of aprinter according to a first exemplary embodiment of the presentinvention;

FIG. 2 is a flowchart showing a main routine of direct print processing;

FIG. 3 is a diagrammatic illustration showing a relationship between anoriginal image of a file and a replaced image (Partial Replacement Mode;Replacement with an error image);

FIG. 4 is a flowchart showing replacement processing (PartialReplacement Mode; Replacement with an error image);

FIG. 5 is a flowchart showing replacement processing (PartialReplacement Mode; Replacement with space);

FIG. 6 is a diagrammatic illustration showing a relationship between anoriginal image of a file and a replaced image (Partial Replacement Mode;Replacement with space);

FIG. 7 is a flowchart showing replacement processing (PartialReplacement Mode; Replacement with an error message image);

FIG. 8 is a diagrammatic illustration showing a relationship between anoriginal image of a file and a replaced image (Partial Replacement Mode;Replacement with an error message image);

FIG. 9 is a flowchart showing replacement processing (Entire PageReplacement Mode; Replacement with an error image);

FIG. 10 is a diagrammatic illustration showing a relationship between anoriginal image of a file and a replaced image (Entire Page ReplacementMode; Replacement with an error image);

FIG. 11 is a flowchart showing replacement processing (Entire PageReplacement Mode; Replacement with space);

FIG. 12 is a diagrammatic illustration showing a relationship between anoriginal image of a file and a replaced image (Entire Page ReplacementMode; Replacement with space);

FIG. 13 is a flowchart showing replacement processing (Entire PageReplacement Mode; Replacement with an error message image);

FIG. 14 is a diagrammatic illustration showing a relationship between anoriginal image of a file and a replaced image (Entire Page ReplacementMode; Replacement with an error message image);

FIGS. 15A and 15B are exemplary diagrammatic illustrations showing arelationship between an original image of a file and a replaced image inN-in-1 printing; and

FIGS. 16A and 16B are other exemplary diagrammatic illustrations showinga relationship between an original image of a file and a replaced imagein N-in-1 printing.

DETAILED DESCRIPTION

Illustrative aspects of the present invention will be described withreference to the drawings.

1. Exemplary Structure of a Printer

A printer 10 (one example of an image forming apparatus) of the presentaspect has a PC print function and a direct print function. The PC printfunction includes receiving print data from a host computer (not shown),and the like, and printing the data. The direct print function includesdirectly reading image data stored in external memory, such as USBmemory 17 (one example of storage medium), and printing the read imagedata. The printer 10 has the following characteristic configuration inconnection with the direct print function.

FIG. 1 is a schematic diagram showing the hardware configuration of theprinter 10. The printer 10 has a print unit 11 for subjecting a sheet 19(one example of a printing medium) to printing; a display unit 12; a USBhost I/F 13; a control unit 14; an operation unit 15 operated by a user;a host I/F 16; and internal memory 18. Substitute data of a plurality ofpatterns, which will be described later, as well as a program forcontrolling the overall operation of the printer 10 are stored in theinternal memory 18 (one example of a substitute for a data storageunit). The control unit 14 has a CPU and controls operation of the printunit 11 and operation of the display unit 12 in accordance with theprogram stored in the internal memory 18. Moreover, the printer 10 canestablish data communication with the host computer by way of the hostI/F 16. The USB memory 17 is removably attached to the printer 10, andinformation in the USB memory 17 is read into the control unit 14 by wayof the USB host I/F 13. Accordingly, the USB host I/F 13 and the controlunit 14 act as acquisition units.

Files of various formats are stored in the USB memory 17. A fileincluding data of a format which is not supported and cannot be expandedby the printer 10 [e.g., sound data, motion picture data, data of jointphotographic experts group (JPEG) 2000 format, and the like] can bepresent in the files. Further, a file including data which are corruptand cannot be expanded by the printer 10 can also be present in thefiles. Such data which cannot be expanded are called as unexpanded data.

The operation unit 15 is arranged so as to be able to select anentire-page replacement mode and a partial replacement mode throughpredetermined operation, when the unexpanded data are detected duringexpansion of the file. The entire-page replacement mode includesreplacement of an entire page including unexpanded data with substitutedata. The partial replacement mode includes replacement of onlyunexpanded data with substitute data. Moreover, the operation unit 15 isalso arranged to be able to select, through predetermined operation andin each mode, replacement of an image corresponding to unexpanded data(hereinafter called an unexpanded image) with an error image 20 (e.g., aview showing “unsupported format”) representing an error, space (blank)21, or an error message image 22 including an error message (e.g., amessage showing the cause of an error). At this time, the operation unit15 acts as a selection unit.

2. Control Specifics of the Control Unit

When a direct print function is specified by predetermined operationperformed by way of the operation unit 15 while the USB memory 17 isinserted into the printer 10, the control unit 14 performs controloperation as shown in FIG. 2. In S1, the control unit 14 reads files inthe USB memory 17 and starts processing for expanding data pertaining tothe file into bitmap data (one example of unexpanded data). At thistime, the control unit 14 acts as an expansion unit.

Specifically, when a file being currently processed is a file ofportable document format (PDF) type, expansion is performed in sequencein pages in accordance with information about a tree structure appendedto the file, and each of the pages is expanded in sequence from the topof the page. For example, when a certain page of the file includes insequence from the top a text, an image drawing, and a text as shown inFIG. 3 (a drawing on the left), data pertaining to the first textportion (“Title”) are expanded first, and data pertaining to an imagedrawing 30 are expanded, and data pertaining to a text portion in asubsequent column (“ABCabc . . . ”) are expanded finally.

When the file does not include the unexpanded data (NO in S2), expansionof one page is completed (S3). If the file being currently processedincludes the next page (YES in S4), processing returns to S1. When thenext page is not included (NO in S4), direct printing of the file beingcurrently processed is completed. The control unit 14 converts theexpanded bitmap data through expansion operation into a video signal foruse in forming an image, and outputs the video signal to the print unit11. Thereby, the print unit 11 prints an image originating from the fileonto the sheet 19.

Meanwhile, when unexpanded data are detected during the course ofexpansion of a file (YES in S2), replacement processing is performed inS5 without aborting expansion of the file. At this time, the controlunit 14 acts as an expansion control unit and a replacement unit.

(Partial Replacement Mode: Replacement with an Error Image)

When the partial replacement mode has been selected by way of theoperation unit 15 and when replacement of an unexpanded image with anerror image 20 is selected, replacement processing shown in FIG. 4 isperformed. For example, an image drawing 30 shown in FIG. 3 (left side)is an unexpanded image, the control unit 14 skips in S11 processing forexpanding data pertaining to an image drawing 30. The error image 20 isread from the internal memory 18 as substitute data for the imagedrawing 30, and there is performed processing for replacing the imagedrawing 30 with the error image 20 that is of the same size as that ofthe image drawing 30 (an unexpanded image).

Subsequently, expansion of an unexpanded text area in a subsequentcolumn is continued (S12). When unexpanded data are not detected on thesame page (NO in S13), replacement processing is completed, andprocessing returns to S3 shown in FIG. 2. As shown in FIG. 3 (rightside), the print unit 11 prints on the sheet 19 an image obtained as aresult of replacement of the image drawing 30 (an unexpanded image) withthe error image 20, and outputs the sheet.

Meanwhile, when unexpanded data are detected on the same page (YES inS13), processing returns to step S11 where an unexpanded image isreplaced with the error image 20.

(Partial Replacement Mode: Replacement of an Unexpanded Image withSpace)

When the partial replacement mode has been selected by way of theoperation unit 15 and when replacement of an unexpanded image with thespace 21 shown in FIG. 6 is selected, replacement processing shown inFIG. 5 is performed. In FIG. 5, processing identical with that shown inFIG. 4 is assigned the same reference numerals, and different referencenumerals are assigned solely to different processing operations. Inreplacement processing performed this time, processing for expanding thedata pertaining to the image drawing 30 is skipped in S21, and spacearea of the same size as that of the image drawing 30 is ensured. As aresult, as shown in FIG. 6 (right side), the print unit 11 prints on thesheet 19 the image acquired by replacement of the image drawing 30 (anunexpanded image) with the space area 21, and the sheet is output.

(Partial Replacement Mode: Replacement of an Unexpanded Image with anError Message Image)

When the partial replacement mode has been selected by way of theoperation unit 15 and when replacement of an unexpanded image with theerror message image 22 shown in FIG. 8 is selected, replacementprocessing shown in FIG. 7 is performed. In FIG. 7, processingoperations which are the same as those of processing shown in FIG. 4 areassigned the same reference numerals, and reference symbols are givensolely to different operations. In replacement processing performed atthis time, processing for expanding data pertaining to the image drawing30 is skipped in S31. The error message image 22 is read from theinternal memory 18 as substitute data for the image drawing 30, andthere is performed processing for replacing the image drawing 30 (anunexpanded image) with the error message image 22 of the same size asthat of the image drawing 30. As a result, as shown in FIG. 8 (a drawingon the right), the print unit 11 prints on the sheet 19 an imageobtained by replacement of the image drawing 30 (an unexpanded image)with the error message image 22, and the sheet is output.

(Entire Page Replacement Mode: Replacement of an Unexpanded Image withan Error Image)

When the entire page replacement mode has been selected by way of theoperation unit 15 and when replacement of an unexpanded image with theerror image 20 shown in FIG. 10 is selected, replacement processingshown in FIG. 9 is performed. For example, when the image drawing 30shown in FIG. 10 (a drawing on the left) is an unexpanded image, thecontrol unit 14 skips, in S41, processing for expanding all of sets ofdata (including a text in a subsequent column) subsequent to the imagedrawing 30 in connection with the page being currently processed, anddata which have already been expanded in connection with the page arediscarded. There is performed processing for reading the error image 20from the internal memory 18 as substitute data for the image drawing 30and inserting the error image 20 into the page. This error image 20 mayalso be of the same size as that of the image drawing 30 or a differentsize (e.g., the entire size of the sheet 19). Processing then proceedsto expansion of the next page (S4 in FIG. 2). As a result, as shown inFIG. 10 (right side), the print unit 11 prints on the sheet 19 an imageobtained as a result of replacement of the entire page including theimage drawing 30 (an unexpanded image) with a substitute image includingthe error image 20, and the sheet is output.

(Entire Page Replacement Mode: Replacement of an Unexpanded Image withSpace)

When the entire page replacement mode has been selected by way of theoperation unit 15 and when replacement of an unexpanded image with thespace 21 shown in FIG. 12 is selected, replacement processing shown inFIG. 11 is performed. In replacement processing performed in this case,processing for expanding all sets of data pertaining to images(including a text in a subsequent column) subsequent to the imagedrawing 30 is skipped, in S51, in connection with the page currentlybeing processed, and data having already been expanded in connectionwith this page are discarded. Space area is ensured in the entirety ofthis page. As a result, as shown in FIG. 12 (right side), the print unit11 outputs the sheet 19 in blank without printing an image obtained as aresult of replacement of the entire page including the image drawing 30(an unexpanded image) with the space area 21, namely, without printingan image on the sheet 19.

(Entire Page Replacement Mode: Replacement of an Unexpanded Image withan Error Message Image)

When the entire page replacement mode has been selected by way of theoperation unit 15 and when replacement of an unexpanded image with theerror message image 22 shown in FIG. 14 is selected, replacementprocessing shown in FIG. 13 is performed. In S61, in connection with thepage currently being processed, processing for expanding all sets ofdata pertaining to images (including a text in a subsequent column)subsequent to the image drawing 30 is skipped, and data having alreadybeen expanded in connection with this page are discarded. The errormessage image 22 is read from the internal memory 18 as substitute datafor the image drawing 30, and there is performed processing forinserting the error message image 22 into the page. The error messageimage 22 may be of the same size as that of the image drawing 30 or adifferent size (e.g., the entire size of the sheet 19). Processingproceeds to processing for expanding the next page (S4 in FIG. 2). As aresult, as shown in FIG. 14 (a drawing on the right), the print unit 11prints, on the sheet 19, the image obtained as a result of replacementof the entire page including the image drawing 30 (an unexpanded image)with a substitute image including the error message image 22, andoutputs the sheet.

Incidentally, the print unit 11 may perform N-in-1 (or N-up) printing inwhich images of a plurality of pages are printed on a single sheet 19 inan arranged manner by scaling the images down. FIGS. 15A and 15B showone exemplary example of N-in-1 printing in which the print unit 11prints on the sheet 19 a plurality of pages with replacing the imagedrawing 30 (an unexpanded image) 30 with the space area 21.Incidentally, the image drawing 30 (an unexpanded image) may be replacedwith an error message image or an error image. FIGS. 16A and 16B showother exemplary example of N-in-1 printing in which the print unit 11prints on the sheet 19 a plurality of pages with replacing the entirepage including the image drawing 30 (an unexpanded image) with the spacearea 21. Further, the entire page including the image drawing 30 (anunexpanded image) may be replaced with an error message image or anerror image.

According to the above aspects, even if a file includes unexpanded data,processing for expanding a file is continued by skipping processing forexpanding the unexpanded data. Hence, the file can be printed tocompletion. Moreover, an unexpanded image corresponding to theunexpanded data or an entire page including the unexpanded image isreplaced with a substitute image, so that the original can be printedwithout involvement of a page offset with reference to the original. Theprinter 10 can perform N-in-1 (or N-up) printing in which images of aplurality of pages are printed on a single sheet 19 in an arrangedmanner. However, at the time of N-in-1 printing, images of respectivepages can be arranged in the sequence of pages which is originallyidentical with the sequence of pages of original data (document datastored in a storage medium), and hence the printer is particularlyeffective.

An unexpanded image, or the like, is replaced with a substitute image,and hence the user can ascertain, from the substitute image, thepresence of an unexpanded image and the location of the unexpandedimage.

Moreover, the present aspect is configured so as to print errorinformation generated as a result of expansion of a file on the sheet 19and to output the sheet. Accordingly, the user can readily ascertain thenature of the error having arisen from the error information on thefinally-output sheet 19.

Moreover, in the entire page replacement mode, processing proceeds to anoperation for expanding the next page without expanding subsequent dataat a point in time when unexpanded data are detected, and hence uselessexpansion operation can be omitted.

Alternatively, there can be performed replacement processing inaccordance with data, which are substitutes for a pattern correspondingto the user's preference, by selecting between the entire pagereplacement mode and the partial replacement mode, switching anunexpanded image to the error image 20, the space 21, or the errormessage image 22.

Moreover, using the error image 20 as substitute data enables the userto realize occurrence of an error. Further, when the printer 10 judgesthe nature of an error (e.g., whether the file includes data of anincompatible format, corrupt data, protected data that is, for example,prohibited to be printed out, or the like) and outputs the error messageimage 22 in accordance with a result of the judgment, the user canascertain the nature of the error from the error message image 22. Useof the space area 21 enables the user to ascertain the presence ofunexpanded data with reduction of the load of print processing.

<Other Aspects>

The present invention is not limited to the above aspects. For example,the following aspects also fall within the technical scope of thepresent invention.

In the above aspects, description has been given of a case where anotification unit is configured to print error information on the sheet19 and output the sheet. However, the error information may be displayedon the display unit 12. Further, there may be adopted a configuration ofilluminating an unillustrated display lamp or a configuration of issuinga warning sound.

Further, in the above aspects, description has been given of a casewhere the USB memory 17 is taken as an example storage medium. However,the storage medium may also be a memory card such as Compact Flash®,Smart Medium®, Memory Stick®, and the like. Moreover, the storage mediumis not limited to such external memory and may also be the internalmemory 18 incorporated in the printer 10.

Still further, in the above aspects, description has been given of acase where a file of PDF format is used as an example. However, the fileis not limited to this type. For example, a file of tagged image fileformat (TIFF) may also be adopted. In this case, expansion operation isperformed in accordance with attribute information about a tag. Now, inthe case of a file of this TIFF type, one page is perceived as oneimage. Hence, the partial replacement mode cannot be applied.Accordingly, it is better to make an arrangement in such a way that,when a file is determined to be of TIFF format, the entire pagereplacement mode is selected automatically.

Still further, in the above aspects, description has been given of acase where the printer 10 performs N-in-1 (or N-up) printing in whichimages of a plurality of pages are printed on a single sheet 19 in anarranged manner as an example. However, the N-in-1 (or N-up) printing isnot limited to this type. For example, the printer 10 may also print outimages of a plurality of files on a single sheet as an index printing inan arranged manner.

Still further, in the above aspects, description has been given of acase where the printer 10 is used as an example of the image formingapparatus. However, the image forming apparatus may be a laser printer,a facsimile, a multi-function device having a printer function, areading function (a scanner function), and the like.

Still further, in the above aspects, description has been given of acase where the sheet is made of paper. However, the sheet may also bemade from plastic, such as an OHP sheet, or other materials.

According to another aspect of the invention, the image formingapparatus further includes a notification unit that indicates errorinformation in accordance with the unexpanded data.

According thereto, the user can ascertain error information aboutunexpanded data.

According to still another aspect of the invention, the notificationunit controls the print unit to print the error information on a sheet.

According thereto, a sheet on which error information includingunexpanded data is printed can be generated. Accordingly, the user canreadily ascertain the error information.

According to still another aspect of the invention, the image formingapparatus further includes a replacement unit that replaces at least theunexpanded data with a substitute data which is expandable.

According thereto, the user can specifically ascertain the location ofthe file where the unexpanded data has been included.

According to still another aspect of the invention, the substitute datacorresponds to an entire page including the unexpanded data, and thereplacement unit replaces the entire page with the substitute data.

In relation to a page including in some location the unexpanded data,even when the page is printed after only the portion including theunexpanded data has been replaced with substitute data, there may arisethe case where the page becomes incomplete. Accordingly, in an exemplaryconfiguration of the present invention, the entire page including theunexpanded data is replaced with substitute data.

According to still another aspect of the invention, the expansioncontrol unit controls to skip the expanding of a page including theunexpanded data.

According thereto, wasteful expanding operations can be omitted.

According to still another aspect of the invention, the substitute datacorresponds to the unexpanded data, and the replacement unit replacesthe unexpanded data with the substitute data.

According thereto, print processing is performed while substituted dataare placed at the position of the unexpanded data. Hence, the user canascertain, from the position of the substitute image on the printedsheet, the location of the unexpanded data.

According to still another aspect of the invention, the substitute dataincludes an image data that indicates a print error.

According thereto, the user can clearly ascertain presence of theunexpanded data.

According to still another aspect of the invention, the substitute datacorresponds to an empty space.

According thereto, presence of the unexpanded data can be ascertainedwhile the load of print processing is reduced.

According to still another aspect of the invention, the substitute dataincludes a character data indicating error information corresponding tothe unexpanded data.

According thereto, error information can be ascertained by a substituteimage corresponding to substitute data.

According to still another aspect of the invention, the image formingapparatus further includes: a storage unit that stores a plurality oftypes of substitute data; and a selection unit that selects a specificsubstitute data, wherein the replacement unit replaces at least theunexpanded data with the selected specific substitute data.

According thereto, replacement processing involving use of substitutedata of a pattern responsive to the user's preference can beascertained.

According to still another aspect of the invention, the print unitprints images of a plurality of pages into a single sheet by scalingdown the images.

According thereto, substitute data are inserted into a location of theunexpanded data. Hence, even at the time of N-in-1 (or N up) printing,respective images can be arranged in the original sequence of pages asthat of original data (document data stored in a storage medium).

1. An image forming apparatus comprising: an acquisition unit thatacquires a file stored in a storage medium; an expansion unit thatexpands the acquired file; an expansion control unit that controls theexpansion unit to skip expanding of unexpanded data that is found to beimpossible to expand from the file and to continue the expanding of thefile; and a print unit that executes printing in accordance withexpanded data from the file.
 2. The image forming apparatus according toclaim 1, further comprising: a notification unit that indicates errorinformation in accordance with the unexpanded data.
 3. The image formingapparatus according to claim 2, wherein the notification unit controlsthe print unit to print the error information on a sheet.
 4. The imageforming apparatus according to claim 1, further comprising: areplacement unit that replaces at least the unexpanded data with asubstitute data which is expandable.
 5. The image forming apparatusaccording to claim 4, wherein the substitute data corresponds to anentire page including the unexpanded data, and wherein the replacementunit replaces the entire page with the substitute data.
 6. The imageforming apparatus according to claim 5, wherein the expansion controlunit controls to skip the expanding of a page including the unexpandeddata.
 7. The image forming apparatus according to claim 4, wherein thesubstitute data corresponds to the unexpanded data, and wherein thereplacement unit replaces the unexpanded data with the substitute data.8. The image forming apparatus according to claim 4, wherein thesubstitute data includes an image data that indicates a print error. 9.The image forming apparatus according to claim 4, wherein the substitutedata corresponds to an empty space.
 10. The image forming apparatusaccording to claim 4, wherein the substitute data includes a characterdata indicating error information corresponding to the unexpanded data.11. The image forming apparatus according to claim 4, furthercomprising: a storage unit that stores a plurality of types ofsubstitute data; and a selection unit that selects a specific substitutedata, wherein the replacement unit replaces at least the unexpanded datawith the selected specific substitute data.
 12. The image formingapparatus according to claim 4, wherein the print unit prints images ofa plurality of pages into a single sheet by scaling down the images.